﻿@model UniversityCourses.Models.LoginModel
@{
    ViewBag.Title = "Log in";
    Layout = "~/Views/Shared/SiteLayout.cshtml";
    Html.EnableClientValidation(); 
}
<div class="login-form">
    <img src="../../Images/students.jpg" alt="students" />
    <div>
        @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { name = "loginform", id = "loginform" }))
        {
            @Html.ValidationSummary(true)
            <div class="field">
                @Html.LabelFor(m => m.Email)            
                @Html.TextBoxFor(m => m.Email)
                @Html.ValidationMessageFor(model => model.Email)
            </div>
            <div class="field">
                @Html.LabelFor(m => m.Password)
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(model => model.Password)
            </div>
            <a class="login-button" href="javascript:document.loginform.submit();">log in</a>    
            @Html.ActionLink("click here to sign up", "Signin", "Account") 
        }
        @using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { name = "externalloginform", id = "externalloginform" }))
        { 
            <a href="javascript:document.externalloginform.submit();" >click here to log in with Google</a>   
        }
    </div>
</div>
